<?php

namespace mpend\modules\activity\models;

use Yii;

/**
 * 活动详情
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class ActivityView extends \common\models\activity\Activity {

    /**
     * @inheritdoc
     */
    public function fields() {
        return [
            'id',
            'title' => 'name',
            'description',
            'begintime' => function() {
                return date('Y-m-d', $this->begin_time);
            },
            'end_time' => function() {
                return date('Y-m-d', $this->end_time);
            },
            'thumb',
            'template',
            'content',
            'canEnroll',
            'mplink',
            'handles',
        ];
    }

}
